

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>write_data command &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>write_data command</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/write_data.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="write-data-command">
<span id="index-0"></span><h1>write_data command<a class="headerlink" href="#write-data-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>write_data file keyword value ...
</pre></div>
</div>
<ul class="simple">
<li>file = name of data file to write out</li>
<li>zero or more keyword/value pairs may be appended</li>
<li>keyword = <em>pair</em></li>
</ul>
<pre class="literal-block">
<em>pair</em> value = <em>ii</em> or <em>ij</em>
  <em>ii</em> = write one line of pair coefficient info per atom type
  <em>ij</em> = write one line of pair coefficient info per IJ atom type pair
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>write_data data.*
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Write a data file in text format of the current state of the
simulation.  Data files can be read by the <a class="reference internal" href="read_data.html"><em>read data</em></a>
command to begin a simulation.  The <a class="reference internal" href="read_data.html"><em>read_data</em></a> command
also describes their format.</p>
<p>Similar to <a class="reference internal" href="dump.html"><em>dump</em></a> files, the data filename can contain a &#8220;*&#8221;
wild-card character.  The &#8220;*&#8221; is replaced with the current timestep
value.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The write-data command is not yet fully implemented in
two respects.  First, most pair styles do not yet write their
coefficient information into the data file.  This means you will need
to specify that information in your input script that reads the data
file, via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command.  Second, a few of
the <a class="reference internal" href="atom_style.html"><em>atom styles</em></a> (ellipsoid, line, tri) that
store auxiliary &#8220;bonus&#8221; information about aspherical particles, do not
yet write the bonus info into the data file.  Both these
functionalities will be added to the write_data command later.</p>
</div>
<p>Because a data file is in text format, if you use a data file written
out by this command to restart a simulation, the initial state of the
new run will be slightly different than the final state of the old run
(when the file was written) which was represented internally by LIGGGHTS(R)-PUBLIC
in binary format.  A new simulation which reads the data file will
thus typically diverge from a simulation that continued in the
original input script.</p>
<p>If you want to do more exact restarts, using binary files, see the
<a class="reference internal" href="restart.html"><em>restart</em></a>, <a class="reference internal" href="write_restart.html"><em>write_restart</em></a>, and
<a class="reference internal" href="read_restart.html"><em>read_restart</em></a> commands.  You can also convert
binary restart files to text data files, after a simulation has run,
using the <a class="reference internal" href="Section_start.html#start-7"><span>-r command-line switch</span></a>.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Only limited information about a simulation is stored
in a data file.  For example, no information about atom
<a class="reference internal" href="group.html"><em>groups</em></a> and <a class="reference internal" href="fix.html"><em>fixes</em></a> are stored.  <a class="reference internal" href="read_restart.html"><em>Binary restart files</em></a> store more information.</p>
</div>
<p>Bonds that are broken (e.g. by a bond-breaking potential) are not
written to the data file.  Thus these bonds will not exist when the
data file is read.</p>
<hr class="docutils" />
<p>The <em>pair</em> keyword lets you specify in what format the pair
coefficient information is written into the data file.  If the value
is specified as <em>ii</em>, then one line per atom type is written, to
specify the coefficients for each of the I=J interactions.  This means
that no cross-interactions for I != J will be specified in the data
file and the pair style will apply its mixing rule, as documented on
individual <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> doc pages.  Of course this
behavior can be overridden in the input script after reading the data
file, by specifying additional <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> commands
for any desired I,J pairs.</p>
<p>If the value is specified as <em>ij</em>, then one line of coefficients is
written for all I,J pairs where I &lt;= J.  These coefficients will
include any specific settings made in the input script up to that
point.  The presence of these I != J coefficients in the data file
will effectively turn off the default mixing rule for the pair style.
Again, the coefficient values in the data file can can be overridden
in the input script after reading the data file, by specifying
additional <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> commands for any desired I,J
pairs.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This command requires inter-processor communication to migrate atoms
before the data file is written.  This means that your system must be
ready to perform a simulation before using this command (force fields
setup, atom masses initialized, etc).</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="read_data.html"><em>read_data</em></a>, <a class="reference internal" href="write_restart.html"><em>write_restart</em></a></p>
</div>
<div class="section" id="default">
<h2>Default<a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h2>
<p>The option defaults are pair = ii.</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>